/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 *
 * http://www.gnu.org/copyleft/gpl.html
 */
package l1j.server.server.command.executor;


import l1j.server.server.model.Instance.L1PcInstance;
import l1j.server.server.serverpackets.S_SystemMessage;

public class L1MobDrops implements L1CommandExecutor {
	public static L1CommandExecutor getInstance() {
		return new L1MobDrops();
	}

	private L1MobDrops() {
	}

	@Override
	public void execute(final L1PcInstance pc, final String cmdName, final String arg) {
//		Connection con = null;
//		PreparedStatement pstm = null;
//		ResultSet rs = null;
//		try {
//			final StringTokenizer stringtokenizer = new StringTokenizer(arg);
//			final int mobID = Integer.parseInt(stringtokenizer.nextToken());
//			con = DatabaseFactory.get().getConnection();
//			pstm = con.prepareStatement("SELECT gfxid FROM npc WHERE npcid=?");
//			pstm.setInt(1, mobID);
//			rs = pstm.executeQuery();
//			int gfxID;rs.next();
//			gfxID = rs.getInt("gfxid");
//			rs.close();
//			pstm.close();
//			con.close();
//			final ArrayList<L1Drop> mobDrops = DropTable.getInstance().getDrops(mobID);
//			L1Item item;
//			String blessed;
//			final L1Npc theMob = NpcTable.getInstance().getTemplate(mobID);
//			pc.sendPackets(new S_SystemMessage(theMob.get_name() + "(" + mobID+ ") | gfxID: " + gfxID + " | 掉落查詢:"));
//			for (final L1Drop drop : mobDrops) {
//				item = ItemTable.getInstance().getTemplate(drop.getItemid());
//				if (item.getBless() == 1) {
//					blessed = "";
//				} else if (item.getBless() == 0) {
//					blessed = "\\fR";
//				} else {
//					blessed = "\\fY";
//				}
//				final double chance = drop.getChance() / 10000D;
//				pc.sendPackets(new S_SystemMessage(blessed + "數量: "+ drop.getMin() + "~" + drop.getMax() + " 物品: "+ drop.getItemid() + " " + item.getName() + " 機率: "+chance + "%"));
//			}
//		} catch (final Exception e) {
//			pc.sendPackets(new S_SystemMessage("請輸入 ." + cmdName + "[NPC編號]。"));
//		} finally {
//			SQLUtil.close(rs);
//			SQLUtil.close(pstm);
//			SQLUtil.close(con);
//		}
		pc.sendPackets(new S_SystemMessage("此指令已經棄用。2014-8-11"));
	}
}
